﻿using DreamCMS.Entity.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DreamCMS.Entity
{
    /// <summary>
    /// 站点设置实体
    /// </summary>
    public class SiteSettingInfo
    {
        private string _sitename = "DreamCMS站点内容管理系统";
        private string _sitedescription = "";
        private string _metakeywords;
        private string _metadescription;
        private SiteStatus _sitestatus = SiteStatus.OpenIt;
        private SiteRecordType _guestRecordType = SiteRecordType.ByReFresh;
        private SiteVerify _enableverifycode = SiteVerify.OpenIt; //开启与否验证码

        private PostCommentStatus _commentstatus = PostCommentStatus.Open; //全站评论开启与否

        private SiteCommentApproveType _commentapproved = SiteCommentApproveType.Yes; //评论是否需审核


        private int _sidebarpostcount = 10; //侧栏文章数
        private int _sidebarcommentcount = 10; //侧栏评论数
        private int _sidebartagcount = 10; //侧栏标签数

        private ContentShowType _postshowtype = ContentShowType.Begin200; //文章摘要显示内容
        private int _postrelatedcount = 5; //相关文章数


        private int _pagesizepostcount = 10; //文章列表页每页文章数
        private int _pagesizecommentcount = 50; //文章页每页评论数

        private string _rewriteextension = ".aspx"; //URL伪静态重写扩展名

        private string _footerhtml; //页面底部自定义代码

        private string _theme = "default"; //系统主题名
        private string _mobiletheme = "mobile"; //移动主题名
        private string rubbish; //垃圾词语

        public string Rubbish
        {
            get { return rubbish; }
            set { rubbish = value; }
        }

        #region 全局
        /// <summary>
        /// 网站名称
        /// </summary>
        public string SiteName
        {
            set { _sitename = value; }
            get { return _sitename; }
        }

        /// <summary>
        /// 网站描述
        /// </summary>
        public string SiteDescription
        {
            set { _sitedescription = value; }
            get { return _sitedescription; }
        }



        /// <summary>
        /// Meta 关键字
        /// </summary>
        public string MetaKeywords
        {
            set { _metakeywords = value; }
            get { return _metakeywords; }
        }

        /// <summary>
        /// Meta 描述
        /// </summary>
        public string MetaDescription
        {
            set { _metadescription = value; }
            get { return _metadescription; }
        }

        /// <summary>
        /// 网站状态
        /// </summary>
        public SiteStatus TheSiteStatus
        {
            set { _sitestatus = value; }
            get { return _sitestatus; }
        }

        /// <summary>
        /// 程序版本
        /// </summary>
        public string Version
        {

            get { return "1.0 BETA build 20140325"; }
        }



        /// <summary>
        /// 访问数量统计类型(包括文章浏览次数,网站访问次数)
        /// 1:按刷新次数统计,2:按IP 24小时统计一次
        /// </summary>
        public SiteRecordType GuestRecordType
        {
            set { _guestRecordType = value; }
            get { return _guestRecordType; }
        }

        /// <summary>
        /// 启用验证码
        /// </summary>
        public SiteVerify EnableVerifyCode
        {
            set { _enableverifycode = value; }
            get { return _enableverifycode; }
        }

        #endregion

        #region 评论相关
        /// <summary>
        /// 允许与否评论
        /// </summary>
        public PostCommentStatus CommentStatus
        {
            set { _commentstatus = value; }
            get { return _commentstatus; }
        }

        /// <summary>
        /// 评论审核方法
        /// 0:不审核,1:要审核
        /// </summary>
        public SiteCommentApproveType CommentApproved
        {
            set { _commentapproved = value; }
            get { return _commentapproved; }
        }

        #endregion



        #region 侧栏

        /// <summary>
        /// 侧栏文章数
        /// </summary>
        public int SidebarPostCount
        {
            set { _sidebarpostcount = value; }
            get { return _sidebarpostcount; }
        }

        /// <summary>
        /// 侧栏展示评论数
        /// </summary>
        public int SidebarCommentCount
        {
            set { _sidebarcommentcount = value; }
            get { return _sidebarcommentcount; }
        }

        /// <summary>
        /// 侧栏展示标签数
        /// </summary>
        public int SidebarTagCount
        {
            set { _sidebartagcount = value; }
            get { return _sidebartagcount; }
        }



        #endregion

        #region 分页相关

        /// <summary>
        /// 文章列表的每页的文章数量
        /// </summary>
        public int PageSizePostCount
        {
            set { _pagesizepostcount = value; }
            get { return _pagesizepostcount; }
        }


        /// <summary>
        /// 评论的每页评论数量
        /// </summary>
        public int PageSizeCommentCount
        {
            set { _pagesizecommentcount = value; }
            get { return _pagesizecommentcount; }
        }

        #endregion

        #region 重写

        /// <summary>
        /// 重写扩展名
        /// </summary>
        public string RewriteExtension
        {
            set { _rewriteextension = value; }
            get { return _rewriteextension; }
        }

        #endregion

        #region 页脚

        /// <summary>
        /// 页脚Html
        /// </summary>
        public string FooterHtml
        {
            set { _footerhtml = value; }
            get { return _footerhtml; }
        }

        #endregion

        #region 主题

        /// <summary>
        /// 主题
        /// </summary>
        public string Theme
        {
            set { _theme = value; }
            get { return _theme; }
        }

        /// <summary>
        /// 手机版主题
        /// </summary>
        public string MobileTheme
        {
            set { _mobiletheme = value; }
            get { return _mobiletheme; }
        }

        #endregion


        #region 文章

        /// <summary>
        /// 相关文章数
        /// </summary>
        public int PostRelatedCount
        {
            set { _postrelatedcount = value; }
            get { return _postrelatedcount; }
        }

        /// <summary>
        /// 文章显示类型
        /// 1:仅标题,2:摘要,3,正文前200字,4:正文
        /// </summary>
        public ContentShowType PostShowType
        {
            set { _postshowtype = value; }
            get { return _postshowtype; }
        }
        #endregion
    }
}